home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10290 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.7 KB  |  61 lines

  1. Path: solon.com!not-for-mail
  2. From: walter briscoe <walter@wbriscoe.demon.co.uk>
  3. Newsgroups: comp.lang.c,comp.lang.c.moderated,hp.unix,comp.sys.hp.apps,comp.sys.hp.hpux
  4. Subject: Re: C coding problem
  5. Date: 16 Mar 1996 10:22:27 -0600
  6. Organization: Digital Solutions
  7. Sender: clc@solutions.solon.com
  8. Approved: clc@solutions.solon.com
  9. Message-ID: <4ieps3$agq@solutions.solon.com>
  10. References: <4ianbf$h86@solutions.solon.com>
  11. Reply-To: walter@wbriscoe.demon.co.uk
  12. NNTP-Posting-Host: solutions.solon.com
  13. X-NNTP-Posting-Host: wbriscoe.demon.co.uk
  14. X-Newsreader: Demon Internet Simple News v1.30
  15. X-Mail2News-Path: wbriscoe.demon.co.uk
  16.  
  17. In article <4ianbf$h86@solutions.solon.com>
  18.            proctor@corp.hp.com "Stephen Proctor" writes:
  19.  
  20. > Greetings,
  21. > I am trying to write a *simple* C program and am running into the following
  22. > warning problem shown below.  Why do I get this warning?  
  23. > It seems to have an effect on the logic of the program when executed.
  24.  
  25. [snip]
  26.  
  27. > 1.) The following is the compilation line and the resulting warning message,
  28. > % c89 shell.c -o shell
  29. > cc: "shell.c", line 98: warning 608: Illegal integer-pointer 
  30. > combination in assignment.
  31.  
  32. [snip]
  33.  
  34. > main(int argc, char *argv[])
  35. > {
  36. > int ii;
  37. > int option_val = 0;
  38. > /* skip lines */
  39. > for (ii=1; ii<argc; ii++) {
  40. > /* skip lines */
  41. > /* The next line is the offending line */
  42. >    if (*argv[ii] == '-') option_val = read_options;
  43. > /* skip lines */
  44. > return 0;         /* Program executed successfully */
  45. > }
  46.  
  47. Your extract neither balances braces nor declares read_options.
  48.  
  49. My guess is that you have hidden something like `int *read_options;`
  50.  
  51. That would account for your error message.
  52.  
  53. I would expact that scenario to "have an effect on the logic of the
  54. program when executed".
  55. -- 
  56. walter briscoe
  57.